package main

import (
	"fmt"
	"learngo/Functions/pointer"
)

func main() {
	// function.PaintNeeded(4.2, 3.0)
	// function.PaintNeeded(5.2, 3.5)

	/* var amount, total float64 //声明变量来保存当前墙面的用量，以及所有墙面的总用量

	amount = function.PaintNeeded(4.2, 3.0)
	fmt.Printf("%0.2f liters needed\n", amount)
	total += amount

	amount = function.PaintNeeded(5.2, 3.5)
	fmt.Printf("%0.2f liters needed\n", amount)
	total += amount

	fmt.Printf("Total: %0.2f liters\n", total) */

	/* amount, err := function.PaintNeeded(4.2, -3.0)
	fmt.Println(err)
	fmt.Printf("%0.2f liters needed\n", amount) */
	/*
		打印信息：   a height of -3.00 is invaild
					0.00 liters needed
		显然需要改进
	*/

	/* amount, err := function.PaintNeeded(4.2, -3.0)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%0.2f liters needed\n", amount) */

	/* var myFloatPointer *float64 = pointer.CreatePointer()
	fmt.Println(*myFloatPointer) */

	amount := 6
	pointer.TestPointer4(&amount)
	fmt.Println(amount)

}
